

    const test = require('ava');
    const superKoa = require('superkoa');
    const app = require('../app');

    test('async superkoa()', async t => {
        let res = await superKoa(app).get('/');
        t.is(200, res.status);
    });

    test.serial('login', async t => {
        let testCategory = {
            username: 'tom',
            password: '123456'
        }
        let res = await superKoa(app)
        .post('/checklogin')
        .send(testCategory);
        t.is(302, res.status);
    });